#!/bin/bash


cd /root
wget https://cmake.org/files/v3.12/cmake-3.12.0.tar.gz --no-check-certificate
tar -xf cmake-3.12.0.tar.gz
cd cmake-3.12.0/
./configure --prefix=/usr/local/cmake
make -j120 && make install
mv /usr/bin/cmake /usr/bin/cmake.bak
ln -s /usr/local/cmake/bin/cmake /usr/bin/cmake
#rm -rf /usr/bin/cmake
#cmake --version
